<?php
require_once "../Common/database.php";
require_once "../Common/values.php";
$query="INSERT INTO tblSolutions VALUES ('$_GET[log]','$date','$time','$user','$lang_added_to $user calender for $_POST[date](YearMonthDay) @ $_POST[time]','0','')";
mysql_query($query);

$query="UPDATE tblJobs SET  Status='Scheduled' ,Line='1' WHERE LogNumber = '$_GET[log]' ";
#echo $query;
mysql_query($query);


   header("Content-Type: text/x-vCalendar");
    header("Content-Disposition: inline; filename=MyvCalFile.vcs");
$_POST[time]=$_POST[time]-100;
echo 'BEGIN:VCALENDAR
VERSION:1.0
BEGIN:VEVENT
STATUS:BUSY
DTSTART:'.$_POST[date].'T'.$_POST[time].'00
DTEND:'.$_POST[date].'T'.$_POST[time].'00
SUMMARY:Investergate Job : '.$_GET[log].'
DESCRIPTION: Investergate Job : '.$_GET[log].'
END:VEVENT
END:VCALENDAR';

exit;
?>
